﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI;
using System.Web.UI.WebControls;
using FineUI;
namespace ZHDJ.WebPage.ControlEx
{
    [Designer("FineUI.Design.HyperLinkDesigner, FineUI.Design")]
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:HyperLinkImagePreview Text=\"HyperLink\" Label=\"Label\" runat=server></{0}:HyperLinkImagePreview>")]
    public class HyperLinkImagePreview: FineUI.HyperLink
    {
        /// <summary>
        /// 窗体地址
        /// </summary>
        [DefaultValue("")]
        [Description("窗体地址")]
        public string WindinsUrl
        {
            get
            {
                //object obj = FState["WindinsUrl"];
                //var temp= obj.ToString();
                //if (string.IsNullOrEmpty(temp))
                //{
                   var temp= "/App/Share/ImagePreview.aspx";
                //}
                return temp;
            }
            //set
            //{
            //    FState["WindinsUrl"] = value;
            //}
        }
        /// <summary>
        /// 图片ID
        /// </summary>
        [DefaultValue("")]
        [Description("图片ID")]
        public string ImageID
        {
            get
            {
                object obj = FState["ImageID"];
                return obj == null ? "" : (string)obj;
            }
            set
            {
                FState["ImageID"] = value;
            }
        }
        ///// <summary>
        ///// 窗体标题
        ///// </summary>
        //[DefaultValue(false)]
        //[Description("窗体标题")]
        //public string WindinsTitle
        //{
        //    get
        //    {
        //        object obj = FState["WindinsTitle"];
        //        return obj.ToString();
        //    }
        //    set
        //    {
        //        FState["WindinsTitle"] = value;
        //    }
        //}

        /// <summary>
        /// 窗体宽度
        /// </summary>
        [DefaultValue(650)]
        [Description("窗体宽度")]
        public Unit WindinsWidth
        {
            get
            {
                object obj = FState["WindinsWidth"];
                return obj == null ? Unit.Parse("650") : Unit.Parse(obj.ToString());
            }
            set
            {
                FState["WindinsWidth"] = value;
            }
        }

        /// <summary>
        /// 窗体高度
        /// </summary>
        [DefaultValue(450)]
        [Description("窗体高度")]
        public Unit WindinsHeight
        {
            get
            {
                object obj = FState["WindinsHeight"];
                return obj == null ? Unit.Parse("450") : Unit.Parse(obj.ToString());
            }
            set
            {
                FState["WindinsHeight"] = value;
            }
        }




    }
}
